<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div>
        <span id="hEL"></span>:
        <span id="mEL"></span>:
        <span id="sEL"></span>
    </div>
    <script>
        function clock() {

            const hEL = document.getElementById('hEL');
            const mEL = document.getElementById('mEL');
            const sEL = document.getElementById('sEL');
            setInterval(() => {
                const date = new Date();
                const h = date.getHours();
                const m = date.getMinutes();
                const s = date.getSeconds();
                hEL.innerHTML = h;
                mEL.innerHTML = m;
                sEL.innerHTML = s;
            }, 1000);
        }

        clock();
    </script>
</body>

</html>